package com.nidu.demo.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nidu.demo.user.mapper.dataobject.UserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<UserDO> {

    @Select("SELECT * FROM sys_user WHERE username = #{username} LIMIT 1")
    UserDO selectByUsername(String username);

    @Select("SELECT * FROM sys_user WHERE mobile = #{mobile} LIMIT 1")
    UserDO selectByMobile(String mobile);

    @Select("SELECT * FROM sys_user WHERE email = #{email} LIMIT 1")
    UserDO selectByEmail(String email);

}